<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="/apServierPath"></script>
<script src="jquery-3.5.1.min.js"></script>
<script src="config.js"></script>
<script type="text/javascript">
	$(function() {
		$('#btu_g').click(function() {
			$.ajax({
				url : globalConfig.path + '/g',
				type : 'get',
				dataType : 'json',
				contentType : 'application/json;charset=UTF-8',
				success : function(result) {
					alert(JSON.stringify(result));
				},
				error(jqXHR, textStatus, errorThrown){
					alert(JSON.stringify(jqXHR));
				}
			});
		});
		
		$('#btu_gd').click(function() {
            window.location.href=globalConfig.path+"/gd";
        });
	});
</script>
</head>

<body>

	<button id="btu_g">生成</button>
	<button id="btu_gd">生成并下载</button>
</body>
</html>
